library(shiny)
options(shiny.maxRequestSize = 9*1024^2)
shinyServer(function(input,output){
  data <- reactive({
    file1 <- input$file
    if(is.null(file1)){return()}
    read.table(file = file1$datapath,
               sep=input$sep,
               header = input$header,
               stringsAsFactors = input$stringsAsFactors)
  })
  output$filedf <- renderTable({
    if(is.null(data())){return()}
    input$file
  })
  output$sum <- renderTable({
    if(is.null(data())){return()}
    summary(data())
  })
  
  output$table <-renderTable({
    if(is.null(data())){return()}
    data()
  })
  output$tb <- renderUI({
    if(is.null(data()))
      h5("Powered by",tags$img('RStudio-Ball.png',height = 200, width = 200))
    else
      tabsetPanel(tabPanel(title = "About file",tableOutput("filedf")),
                  tabPanel(title = "Data",tableOutput("table")),
                  tabPanel(title = "Summary",tableOutput("sum")))
  })
})